import { createApp } from 'vue'
import App from './App.vue'
import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            //路由路径 有点类似@RequestMapping
            path: "/main",
            name: "main",
            //跳转的组件
            component: () => import('./components/Main.vue')
        },
        {
            //路由路径
            path: "/content",
            name: "content",
            //跳转的组件
            component: () => import('./components/Content.vue')
        },
]
})
// 使用use来使用路由
createApp(App).use(router).mount('#app')
